package com.ssy.lingxi.platform.manage.repository;


import com.ssy.lingxi.platform.manage.entity.base.SensitiveWord;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Repository
public interface SensitiveWordRepository extends JpaRepository<SensitiveWord, Long>, JpaSpecificationExecutor<SensitiveWord> {

    @Transactional
    void deleteByIdIn(List<Long> ids);

    @Transactional
    void deleteByBatchNo(String batchNo);

    Boolean existsByName(String name);

    Boolean existsByNameAndIdNot(String name, Long id);
}
